<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="${pageContext.request.contextPath}/css/login.css" rel="stylesheet"/>
</head>
<body>
	<%
		session.invalidate();
	%>
   <div class="div0" align="center">
    <p class="p1">管理员系统</p>
      <form action="${pageContext.request.contextPath }/admin/login" method="post" onsubmit="return checkForm(this);">
        <div class="div-1"> <input type="text" name="adminName" placeholder="用户名"></div>
         <br>
         <div class="div-1"> <input type="password" name="adminPass" placeholder="密码"></div>
         <br>
         <div><button >登&nbsp;&nbsp;录</button></div>
      </form>
   </div>
</body>
<%-- <script type="text/javascript">
//取出传回来的参数error并与yes比较  
 var errori ='<%=request.getParameter("error")%>';
 var errori ='${param.error}'; 
if(errori=='yes'){
 alert("用户名或密码错误，请重新登录!");
}
</script> --%>
<script type="text/javascript">
function checkForm(form) {
	if(form.userAccount.value == "") {
	alert("用户名不能为空!");
	form.userAccount.focus();
	return false;
	}
	if(form.userPass.value == "") {
	alert("密码不能为空!");
	form.userPass.focus();
	return false;
	}
	return true;
	}
</script> 
</html>